#include <iostream>
using namespace std;

const int maxn = 2001;

char ch[maxn];
int n;

void work();

int main()
{
	cin >> n;
	for (int i = 0; i < n; ++i) cin >> ch[i];
	work();
	return 0;
}

void work()
{
	for (int l = 0, r = n-1, tot = 0; l <= r;) {
		int ll = l, rr = r;
		for (; ch[ll] == ch[rr] && ll < rr; ++ll, --rr);
		if (ch[ll] < ch[rr]) {
			cout << ch[l];
			++l;
		} else {
			cout << ch[r];
			--r;
		}
		if (++tot == 80) {
			cout << endl;
			tot = 0;
		}
	}
}
